package edu.byu.intex2.data.dao;

import edu.byu.intex2.data.dao.*;
import java.sql.*;
import java.util.*;

/*******************************************************************************
 *
 *        @author Adam
 *          Date: Mar 3, 2009
 *   Description:
 * Last Revision: Mar 3, 2009
 *
 ******************************************************************************/

public class TaskDAO {


    /////////////////////////////////////////////
    ///   Singleton code
    private static TaskDAO instance = null;

    /** Creates a new instance of TaskDAO */
    private TaskDAO() {
    }//constructor

    /** Retrieves the single instance of this class */
    public static synchronized TaskDAO getInstance() {
        return null;
    }//getInstance

    ////////////////////////////////////////////
    ///   CREATE methods
    /** Creates a new Task in the database */
    public Task create(String id) throws DataException {

    return null;
    }//create

    ////////////////////////////////////////////
    ///   READ methods
    /** Reads an existing Task from the database */
    public Task read(String id) throws DataException {
       return null;
    }//end read

      /** Reads an existing Task from the database */
    public List<Task> readBy(String colName, String var) throws DataException {
        return null;
    }//end readBy

   /** Internal method to read an existing Task from the database */
    synchronized Task read(String id, Connection conn) throws Exception {
        return null;
    }//read

    /** Internal method to create a Task object from a record */
    synchronized Task readRecord(ResultSet rs, Connection conn) throws Exception {
        return null;
    }//readRecord

   /////////////////////////////////////////////
    ///   UPDATE methods
      /** Saves an existing Task in the database */
  public void save(Task task) throws DataException {

  }//update

  /** Internal method to update a Task in the database */
  void save(Task task, Connection conn) throws Exception {

  }//save

  /** Saves an existing task to the database */
  public void update(Task task, Connection conn) throws Exception {

  }

  /** Inserts a new Task into the database */
  public void insert(Task task, Connection conn) throws Exception {

  }

    /////////////////////////////////////////////////
    ///   DELETE methods
    /** We do not support deleting of business objects in this application */
    public void delete(Task t) throws Exception {
        throw new RuntimeException("No deletions allowed.");
    }

    ////////////////////////////////////////////////
    ///   SEARCH methods
    /** Retrieves all Task from the database */
    public List<Task> getAll() throws DataException {
        return null;
    }//end getall

    /** Internal method to search by certain fields */
    private List<Task> search(PreparedStatement stmt, Connection conn) throws Exception {
       return null;
    }

}
